package org.springmole.business.bean.hibernate;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlElements;

import org.springmole.business.bean.ResultData;

@XmlAccessorType(XmlAccessType.FIELD)
public class HibernateResultData<T extends HibernateData> extends ResultData {

	@XmlElementWrapper(name="HibernateDataList")
	@XmlElements({
		@XmlElement(name="Data", type=EntityData.class),
		@XmlElement(name="Data", type=QueryData.class),
		@XmlElement(name="Data", type=CollectionData.class),
		@XmlElement(name="Data", type=SecondLevelData.class),
		@XmlElement(name="Data", type=SummaryData.class)
	})
	private List<T> hibernateDataList = new ArrayList<T>();
	
	
	public HibernateResultData() {
	}
	
	public HibernateResultData(String name) {
		super(name);
	}
	
	
	public List<T> getHibernateDataList() {
		return hibernateDataList;
	}
	public void setHibernateDataList(List<T> hibernateDataList) {
		this.hibernateDataList = hibernateDataList;
	}
	
}
